package com.hdu.dwh.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hdu.dwh.pojos.DatabaseAll;
import com.hdu.dwh.pojos.SubjectTable;
import com.hdu.dwh.pojos.source_access_pojos.DataWarehouseTable;
import com.hdu.dwh.vos.TableDetilVo;
import com.hdu.dwh.results.ResponseResult;

import java.util.List;

/**
 * <p>
 * 统一数据库表 服务类
 * </p>
 *
 * @author bobo
 * @since 2025-04-10
 */
public interface IDatabaseAllService extends IService<DatabaseAll> {

    boolean existsDatabase(String sourceDatabaseName);

    List<TableDetilVo> createTableDetilVoListForSource(List<DataWarehouseTable> records);

    List<TableDetilVo> createTableDetilVoListForSubject(List<SubjectTable> records);

    ResponseResult listByDatabaseType(Integer dataBaseType);

    Long getIdByDatabaseName(String databaseName);

    boolean existsById(Long databaseId);

    boolean delete(Integer databaseType, Long databaseId);
}
